//
//  ZRThirdManager.h
//  简书:https://www.jianshu.com/u/043e94ca450f
//
//  Created by 黄涛 on 2018/8/9.
//  Copyright © 2018年 黄涛(ZR:zero). All rights reserved.
//  第三方(微信.微博.QQ) 支付 登录 管理工具

#import <Foundation/Foundation.h>

#import <AlipaySDK/AlipaySDK.h>
#import <TencentOpenAPI/QQApiInterface.h>
#import <TencentOpenAPI/TencentOAuth.h>
#import <WechatOpenSDK/WXApi.h>
#import <Weibo_SDK/WeiboSDK.h>

typedef void (^thirdPayBlock)(NSDictionary * successInfoDic);;

typedef void (^thirdLoginBlock)(NSDictionary * successInfoDic);

@interface ZRThirdManager : NSObject <TencentSessionDelegate,WXApiDelegate,WeiboSDKDelegate>

+ (instancetype)sharedManager;

/** 第三方支付 成功回调 */
@property (nonatomic , copy) thirdPayBlock thirdPaySuccess;

/** 第三方登录 成功回调 */
@property (nonatomic , copy) thirdLoginBlock thirdLoginSuccess;


/** 微信 是否安装 */
+ (BOOL)hasWechatApp;

/** 微博 是否安装 */
+ (BOOL)hasWeiboApp;

/** QQ 是否安装 */
+ (BOOL)hasQQApp;



/** 微信登录 */
+ (void)weChatLogin:(void(^)(NSDictionary * successInfoDic))success;

/** 微博登录 */
+ (void)weiboLogin:(void(^)(NSDictionary * successInfoDic))success;

/** QQ登录 */
+ (void)QQLogin:(void(^)(NSDictionary * successInfoDic))success;


/** 支付宝 支付 */
+ (void)aliPayWithData:(NSString *)data success:(void(^)(NSDictionary * successInfoDic))success;

/** 微信 支付 */
+ (void)wechatPayWithData:(NSDictionary *)data success:(void(^)(NSDictionary * successInfoDic))success;

@end
